﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Membership.master" AutoEventWireup="true" CodeFile="MemberRoles.aspx.cs" Inherits="Admin_MembershipProvider_Access_MemberRoles" Title="Create Roles" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Src="~/Admin/MembershipProvider/Access/Controls/AccessRules.ascx" TagName="AccessNav" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<table>
        <tr>
            <th>
                Roles
            </th>
        </tr>
        <tr><td><uc1:AccessNav ID="ucAccessNav" runat="server" /></td></tr>
        <tr>
            <td align="left">
                <br />
                <telerik:RadGrid runat="server" ID="UserRoles" AutoGenerateColumns="false" OnItemCommand="UserRoles_ItemCommand"
                    Width="500px">
                    <MasterTableView>
                        <AlternatingItemStyle CssClass="RadGridAltr" />
                        <Columns>
                            <telerik:GridTemplateColumn>
                                <HeaderTemplate>
                                    Role Name</HeaderTemplate>
                                <ItemTemplate>
                                    <%# Eval("Role Name") %>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn>
                                <HeaderTemplate>
                                    User Count</HeaderTemplate>
                                <ItemTemplate>
                                    <%# Eval("User Count") %>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn>
                                <HeaderTemplate>
                                    Delete Role</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Button ID="Button1" runat="server" CommandArgument='<%# Eval("Role Name") %>'
                                        Text="Delete" OnClientClick="return confirm('Are you sure?')" CommandName="DeleteRole" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
                <p>
                    <table>
                        <tr>
                            <td>
                                <asp:TextBox runat="server" ID="NewRole"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Button ID="btnAddRole" runat="server" Text="Add Role" OnClick="btnAddRole_Click" />
                            </td>
                        </tr>
                    </table>
                    New Role:
                </p>
                <div runat="server" id="ConfirmationMessage" class="alert">
                </div>
            </td>
        </tr>
    </table>
</asp:Content>

